/**
 * Created by 16020025 on 2017/5/22.
 */
$(function() {
    var titleDivVue = new Vue({
        el: '.title_div',
        methods: {
            //团课记录
            showGroupCourse: function () {
                $("#groupCourse").siblings().removeClass("title_on");
                $("#groupCourse").addClass("title_on");
                var _self = listVue;
                var list = [
                    { courseName: '团课1',courseTime:'10',courseDescription:'腹肌锻炼，该课程是大班课程',courseImg:"../../img/icon/paobu.png" },
                    { courseName: '团课2',courseTime:'9',courseDescription:'胸肌构建，该课程是大班课程',courseImg:"../../img/icon/jianshen2.png" },
                    { courseName: '团课3',courseTime:'4',courseDescription:'腹肌锻炼，该课程是大班课程',courseImg:"../../img/icon/paobu.png"},
                    { courseName: '团课4',courseTime:'4',courseDescription:'腹肌锻炼，该课程是大班课程',courseImg:"../../img/icon/paobu.png" },
                    { courseName: '团课5',courseTime:'2',courseDescription:'腹肌锻炼，该课程是大班课程',courseImg:"../../img/icon/paobu.png" }
                ];
                _self.list = list
                /*var url = "...";
                 $.ajax({
                 type: 'GET',
                 url: url,
                 success:function(data) {
                 printjson = JSON.stringify(data);
                 _self.list = data.data.rows;
                 }
                 });*/
            },
            //私课记录
            showPrivateCourse:function(){
                $("#privateCourse").siblings().removeClass("title_on");
                $("#privateCourse").addClass("title_on");
                var _self = listVue;
                var list = [
                    { courseName: '私课1',courseTime:9,courseDescription:"该课程是一对一教学",courseImg:"../../img/icon/paobu.png" },
                    { courseName: '私课2',courseTime:9,courseDescription:"该课程是一对一教学",courseImg:"../../img/icon/jianshen2.png" },
                    { courseName: '私课3',courseTime:4,courseDescription:"该课程是一对一教学",courseImg:"../../img/icon/paobu.png"},
                    { courseName: '私课4',courseTime:3,courseDescription:"该课程是一对一教学",courseImg:"../../img/icon/paobu.png" }
                ];
                _self.list = list
            }
        }
    });

    var listVue = new Vue({
        el: '#courseList',
        data: {
            //显示JSON
            message:'',
            //对象
            object : '',
            //对象数组
            list : [
                { courseName: '团课1',courseTime:'10',courseDescription:'腹肌锻炼，该课程是大班课程',courseImg:"../../img/icon/paobu.png" },
                { courseName: '团课2',courseTime:'9',courseDescription:'胸肌构建，该课程是大班课程',courseImg:"../../img/icon/jianshen2.png" },
                { courseName: '团课3',courseTime:'4',courseDescription:'腹肌锻炼，该课程是大班课程',courseImg:"../../img/icon/paobu.png"},
                { courseName: '团课4',courseTime:'4',courseDescription:'腹肌锻炼，该课程是大班课程',courseImg:"../../img/icon/paobu.png" },
                { courseName: '团课5',courseTime:'2',courseDescription:'腹肌锻炼，该课程是大班课程',courseImg:"../../img/icon/paobu.png" }
            ]
        }
    });

});